function ApprovalCtrl($scope, $state, $http) {

    $scope.onCreateApplicationPageChange = function () {
        $http({
            url: 'application/create/unchecked',
            method: 'get',
            params: {
                pageSize: 5,
                page: $scope.createApplicationCurrentPage - 1
            },
        }).success(function (response) {
            $scope.createApplicationList = response.content;
            $scope.createApplicationPageCount = response.totalPages;
            // $scope.currentPage = response.page + 1;
        })
    };

    $scope.initPage = function () {
        $http({
            url: 'application/create/unchecked',
            method: 'get',
            params: {
                pageSize: 5,
                page: 0
            },
        }).success(function (response) {
            $scope.createApplicationList = response.content;
            $scope.createApplicationPageCount = response.totalPages;
            // $scope.currentPage = response.page + 1;
        })
    };

    $scope.initPage();

    $scope.submitCreate = function (uid, approve) {
        $http({
            url: 'application/create/check',
            method: 'post',
            params: {
                uid: uid,
                approve: approve
            },
        }).success(function (response) {
            alert('成功！');
            $state.reload('index.approval');
            // $scope.currentPage = response.page + 1;
        })
    }
}